#include "pwm.h"
void init_timer3(void){
	// Port E initialization
	// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In 
	// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T 
	PORTE=0x00;
	DDRE=0x38;
	// Timer/Counter 3 initialization
    // Clock source: System Clock
    // Clock value: 2000.000 kHz
    // Mode: Ph. correct PWM top=00FFh
    // Noise Canceler: Off
    // Input Capture on Falling Edge
    // OC3A output: Inverted
    // OC3B output: Inverted
    // OC3C output: Inverted
    // Timer 3 Overflow Interrupt: Off
    // Input Capture Interrupt: Off
    // Compare A Match Interrupt: Off
    // Compare B Match Interrupt: Off
    // Compare C Match Interrupt: Off
    TCCR3A=0xFD;
    TCCR3B=0x02;
    TCNT3H=0x00;
    TCNT3L=0x00;
    ICR3H=0x00;
    ICR3L=0x00;
    OCR3AH=0x00;
    OCR3AL=0x00;
    OCR3BH=0x00;
    OCR3BL=0x00;
    OCR3CH=0x00;
    OCR3CL=0x00;
	// Timer(s)/Counter(s) Interrupt(s) initialization
    //TIMSK=0x1c;
    //ETIMSK=0x01;
	//SREG = SREG | 0x80;
}